import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'package:leader_help/utils/component/dialog/drop.dart';
import 'package:leader_help/utils/util.dart';

class QuestionDetailEmptyView extends StatelessWidget {
  const QuestionDetailEmptyView({
    Key? key,
    required this.mod,
    this.actionTitle,
  }) : super(key: key);
  final UsuallyModel mod;
  final String? actionTitle;
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(
        children: [
          loadImage(
            url: mod.url,
            width: 300.r,
            fit: BoxFit.fitWidth,
          ),
          Text(
            mod.name,
            style: pfMediumStyle(color: ColorsUtil.title, fontSize: 14.sp),
          ),
          SizedBox(
            height: 20.r,
          ),
          actionTitle == null
              ? const SizedBox()
              : InkWell(
                  onTap: mod.onTap,
                  child: Container(
                    height: 40.r,
                    width: Get.width,
                    margin: EdgeInsets.symmetric(vertical: 10.r),
                    alignment: Alignment.center,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(20.r),
                      border: Border.all(color: ColorsUtil.red),
                    ),
                    child: Text(
                      actionTitle!,
                      style: pfSCStyle(color: ColorsUtil.red, fontSize: 15.sp),
                    ),
                  ),
                )
        ],
      ),
    );
  }
}
